import request from '@/utils/request'
///dev-api/web/courseStandard/del/{id}


export function getList(pageNum, pageSize, courseName, courseStatus, courseType, courseParentId) {
    return request({
        url: '/web/courseStandard/getPage',
        method: 'get',
        params: {pageNum, pageSize, courseName, courseStatus, courseType, courseParentId}
    })
}

export function add(data) {
    return request({
        url: 'web/courseStandard/add',
        method: 'post',
        data
    })
}

export function del(id) {
    return request({
        url: 'web/courseStandard/del/' + id,
        method: 'DELETE'
    })
}

export function getEdi(id) {
    return request({
        url: 'web/courseStandard/' + id,
        method: 'get'
    })
}

export function selSchool(courseId) {
    return request({
        url: 'web/courseStandard/queryByCourseId',
        method: 'get',
        params: { courseId }
    })
}

export function updateStatus(courseId, schoolId, delFlag) {
    return request({
        url: 'web/courseStandard/updateStatus',
        method: 'get',
        params: { courseId, schoolId, delFlag }
    })
}

export function update(data) {
    return request({
        url: 'web/courseStandard/update',
        method: 'post',
        data
    })
}